import React from "react";
import { Image, StyleSheet, TouchableOpacity, View } from "react-native";

export default ({width,height,borderRadius,borderWidth,borderColor,imgeSource,itemWidth,itemheight,onPress}) => {

    return (
        <TouchableOpacity onPress={ onPress}>
            <View style={[styles.root,{width,height,borderRadius,borderWidth,borderColor}]}>
                <Image source={imgeSource} style = {[styles.img,{width:itemWidth,height:itemheight}]}></Image>
            </View>
        </TouchableOpacity>
    );
}

const styles = StyleSheet.create({
    root:{
        justifyContent:'center',
        alignItems:'center',
    },
    img:{
        resizeMode:'contain'
    }
});